import React from 'react'
import './style.scss'

export default function (props:IPicturesGallery) {
  const { urls } = props
  const viewPicture = (url) => {
    window.open(url)
  }
  return (
    <div className="pictures-gallery-box">
      {urls.map((url,index)=><div className="picture-gallery-item" key={index} onClick={()=>viewPicture(url)}><img src={url as any} /></div>)}
    </div>
  )
}

interface IPicturesGallery {
  urls: string[]
}